package com.lfx.concurrent.queue;

/**
 * @author 李逢喜
 * create 2021/7/22
 */
public class QueueMain {

    public static void main(String[] args) throws InterruptedException {
        MyQueueMutil myQueue=new MyQueueMutil();
        for (int i = 0; i < 5; i++) {
            ProducerThread producerThread=new ProducerThread(myQueue);
            ConsumerThread consumerThread=new ConsumerThread(myQueue);
            consumerThread.start();
            producerThread.start();
        }

        Thread.sleep(10000);
        System.exit(0);

    }
}
